package i_thread;

// synchronizedEx
// make : pwg
// date : 2003
// note : 
// =========================================

import java.awt.*;
import java.awt.event.*;

public class SynchronizedEx {
	Bank b = new Bank();

	public SynchronizedEx() {
		InThread t1 = new InThread();
		OutThread t2 = new OutThread();
		
		t2.start();
	}
	public static void main(String[] args) {
		SynchronizedEx syn = new SynchronizedEx();
		
	}

	class InThread extends Thread{
		public void run(){
			for(int i=0 ; i<100;i++) b.input(1);
		}
	}
	
	class OutThread extends Thread{
		public void run(){
			for(int i=0 ; i<100;i++) b.input(-1);
		}
	}
	

}
